<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title>修改中心</title>
		 <link rel="stylesheet" href="css/nav.css">
	
		
		<link href="bootstrap-3.3.5/css/bootstrap.min.css" rel="stylesheet"> 
		<script src="bootstrap-3.3.5/js/bootstrap.min.js"></script>
		<script src="bootstrap-3.3.5/js/jquery.1.4.2-min.js"></script>
		
		<style>
		body{
			font-size: 16px;
			font-family: arial;
		}	
		a{
			color: #666666;
			text-decoration:none;
		}	
		.greyColor{
			color: #262626;
		}	
		.pinkColor{
			color: #ee0000;
		}
	 
	    nav.top{
		    background-color:	#E8E8E8;
			padding-top: 5px;
			padding-bottom: 5px;
			border-bottom:1px solid #e7e7e7;
}
	    nav.top span,nav.top a{
		   	margin: 0px 8px 0px 0px;
		   }
		   nav.top a:hover{
		   	color: #ee0000;
		   	text-decoration: none;
		   }
        #containner{
        	width: 700px;
        	margin-left: 200px;
    
        }
        .form-group{
        	background:#E8E8E8;
        }
		</style>	
	 </head>
	<nav class="top">
	    <button id="user"><a href="#" style="text-decoration: none;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="glyphicon glyphicon-user greyColor"></span>【时光】</a></button>	
		<span style="color: #838B8B;">喵，欢迎来到修改中心</span>
			
		<span class="pull-right">
			<a href="notice.html">消息通知</a>
			<a href="#"><span class="glyphicon glyphicon-envelope pinkColor"></span></a>
			<button><a href="ad_admin_main.html#form-control" >返回</a></button>
		</span>
	</nav>	
	<body>
			<script>
	/*	$("#user").click(function(){*/
          $.ajax({
                type: "get",
                url: "ad_admin_modify.json",
                dataType: "json",
                data: {
					adminId: $('form input[type=text]').val(),
			    },
			    error : function() {
			    alert('请求失败 ');
		        },
　　　　　　　　　       success: function(result){
                addBox(result);
                }
            });
        /*});*/
        
         function addBox(result){
                //result是一个集合,所以需要先遍历
	            $.each(result,function(index,obj){
	            
	                $(".form-control1").append(obj['adminId']);
	                $(".form-control2").append(obj['adminPassword']);
	                $(".form-control3").append(obj['adminName']);
	      
	              
	            });
        }
 	
	</script>
		
		<div id="containner">
		<form class="navbar-form navbar-left"><br />
		<div class="form-group">
		
		 工号：<div class="form-control1" placeholder="gid" style="width: 200px;"></div>
		</div>
  			 <button type="submit" class="btn btn-default" id="btn1">修改</button><br /><p>
				    <script type="text/javascript">
				        $(function(){
				            $('#btn1').click(function(){
				            	var my=prompt("工号将修改为：","");
									var my=confirm("确定修改吗");
								    if(my==true)
								    {  alert("工号已修改");   }
								    else
								    {  alert("已取消修改");   }
				            })
				        })
				    </script>
  		<div class="form-group">
		   
		  密码：<div class="form-control2" placeholder="gpassword" style="width: 200px;"></div>
		</div>
  			<button type="submit" class="btn btn-default" id="btn2">修改</button><br /><p>
  				    <script type="text/javascript">
				        $(function(){
				            $('#btn2').click(function(){
				            	var my=prompt("密码将修改为：","");
									var my=confirm("确定修改吗");
								    if(my==true)
								    {  alert("密码已修改");   }
								    else
								    {  alert("已取消修改");   }
				            })
				        })
				    </script>
  		<div class="form-group">
		    
		    姓名：<div class="form-control3" placeholder="gname" style="width: 200px;"></div>
		</div>
  			<button type="submit" class="btn btn-default" id="btn3">修改</button><br /><p>
  				    <script type="text/javascript">
				        $(function(){
				            $('#btn3').click(function(){
				            	var my=prompt("姓名将修改为：","");
									var my=confirm("确定修改吗");
								    if(my==true)
								    {  alert("姓名已修改");   }
								    else
								    {  alert("已取消修改");   }
				            })
				        })
				    </script>	
        </form>	

		</div>
		
		
		
		
		
		
		
		
		
	</body>
</html>
